Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 6ce6676578dc5b9b58a456528111723b07bd9f04


Parents : 8f2dae4
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-11-24T11:45:10+01:00

Added input and output devices helper functions to telephony primitive

Changes

2 files changed, 7 insertions(+), 0 deletions(-)


Diff

diff --git a/LXST/Filters.py b/LXST/Filters.py
index af8d0fd..4414093 100644
--- a/LXST/Filters.py
+++ b/LXST/Filters.py
@@ -31,6 +31,7 @@ else:
with open(os.path.join(c_src_path, "Filters.c"), "r") as f: c_src = f.read()
native_functions = ffi.verify(c_src)
USE_NATIVE_FILTERS = True
+ RNS.log(f"Successfully compiled and loaded filters library", RNS.LOG_WARNING)
except Exception as e:
RNS.log(f"Could not compile modules for filter acceleration, falling back to Python filters. This will be slow.", RNS.LOG_WARNING)

diff --git a/LXST/Primitives/Telephony.py b/LXST/Primitives/Telephony.py
index ce67754..6271fbc 100644
--- a/LXST/Primitives/Telephony.py
+++ b/LXST/Primitives/Telephony.py
@@ -123,6 +123,12 @@ class Telephone(SignallingReceiver):
ALLOW_ALL = 0xFF
ALLOW_NONE = 0xFE
+ @staticmethod
+ def available_outputs(): return LXST.Sources.Backend().soundcard.all_speakers()
+
+ @staticmethod
+ def available_inputs(): return LXST.Sinks.Backend().soundcard.all_microphones()
+
def __init__(self, identity, ring_time=RING_TIME, wait_time=WAIT_TIME, auto_answer=None, allowed=ALLOW_ALL, receive_gain=0.0, transmit_gain=0.0):
super().__init__()
self.identity = identity


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────